#ifndef _STRAWGUI_EDITABLE_TEXT_RECT_INTANCE_H_
#define _STRAWGUI_EDITABLE_TEXT_RECT_INTANCE_H_

#include "sCRIText.h"

namespace sgui
{
namespace inst
{
    struct sTextCursorPosition
    {
        u32 m_line;
        u32 m_char;
    };

	class sComponentRectEditableText : public sComponentRectText
	{
	public:
		sComponentRectEditableText(const res::sComponentRectText& componentRect, sComponentInstance& instance, s32 id);
		~sComponentRectEditableText();

        sTextCursorPosition getPositionAt(const math::sPointf& point);
        void getCursorPosition(const sTextCursorPosition& pos, math::sPointf& res_pos, f32& res_height) const;

        void OnHoverGet();
        void OnHoverRelease();
	};

};
};

#endif